package org.springframework.beans.factory;

import org.springframework.beans.BeansException;

/**
 * BeanFactory
 *
 * @author xiaohei
 */
public interface BeanFactory {

    /**
     * getBean
     *
     * @param name beanName
     * @return
     * @throws BeansException
     */
    Object getBean(String name) throws BeansException;

    /**
     * getBean
     *
     * @param name
     * @param args
     * @return
     * @throws BeansException
     */
    Object getBean(String name, Object... args) throws BeansException;

    /**
     * getBean
     *
     * @param requiredType
     * @return
     */
    <T> T getBean(Class<T> requiredType) throws BeansException;
}
